Spread for ASP.NET 7.0 Product Documentation
Group(SortInfo[]) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > GroupDataModel Class > Group Method : Group(SortInfo[]) Method


sortInfo
Sort information

Glossary Item Box

Groups the rows with the specified sort information.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Group( _
   ByVal sortInfo() As SortInfo _
) 
Visual Basic (Usage)Copy Code
Dim instance As GroupDataModel
Dim sortInfo() As SortInfo
 
instance.Group(sortInfo)
C# 
public void Group( 
   SortInfo[] sortInfo
)

Parameters

sortInfo
Sort information

Example

This example groups the data model.
C#Copy Code
private void button1_Click(object sender, EventArgs e)
{
FarPoint.Web.Spread.Model.GroupDataModel gm = new FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel);
FarPoint.Web.Spread.SortInfo[] sort = new FarPoint.Web.Spread.SortInfo[1];
sort[0] = new FarPoint.Web.Spread.SortInfo(0, true);
gm.Group(sort);
FpSpread1.ActiveSheetView.DataModel = gm;
}
Visual BasicCopy Code
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim gm As New FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel)
Dim sort(0) As FarPoint.Web.Spread.SortInfo
sort(0) = New FarPoint.Web.Spread.SortInfo(0, True)
gm.Group(sort)
FpSpread1.ActiveSheetView.DataModel = gm
End Sub

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.